names = ['麦克斯','卡洛琳','憨','奥列格','苏菲']
name = list(input("请输入几个美剧的角色名（中文输入且以空格间隔）：").split())
rename = []
for i in range(0,len(name)):
    if name[i] in names:
        rename.append(name[i])
        
        print(names.count(name[i]))
        
    else:
        print("没有出现重名")
print(rename)
